package LeetCode.month02.day55;

public class No230 {
    int res = -1;
    int count = 0;
    public int kthSmallest(TreeNode root, int k) {
        if(root==null) return res;
        kthSmallest(root.left,k);
        count++;
        if(k==count) res = root.val;
        kthSmallest(root.right,k);
        return res;
    }
}
